package com.wtwd.campus.h5_manager.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wtwd.campus.h5_manager.entity.H5ManageSysRolePermission;
import com.wtwd.campus.h5_manager.entity.vo.RolePermissionVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author mjy
 * @since 2022-03-04
 */
@Mapper
public interface H5ManageSysRolePermissionMapper extends BaseMapper<H5ManageSysRolePermission> {

    List<RolePermissionVo> getRolePermissionList(@Param("roleId") Integer roleId);

    List<Integer> getRolePermissionPerIdByRoleId(@Param("roleId") Integer roleId);

    Integer bathAddRolePermission(@Param("roleId") Integer roleId, @Param("list") List<Integer> bathAddPermission);

    Integer deleteByRoleId(@Param("roleId") Integer roleId);

    Integer deleteByRoleIdList(@Param("list") List<Integer> roleIdList);
}
